function [t_v, pt_v]=violation(P,Q,R,sites,triangles, triangleGrid)
%return the violating point if the quadratic curve 
%defined by control points PQR is under the triangles
pt_v=[];
t_v=[];

%pick sampling interval based on the length of the arc
arcLength=norm(P-Q)+norm(Q-R);
interval=max(1/arcLength,1/1000);

%traverse the curve
for t=0:interval:1
    Ft=(1-t)*(1-t)*P+2*t*(1-t)*Q+t*t*R;
    [x_idx, y_idx]=findIdx(Ft(1), Ft(2), triangleGrid);
    T_potentialDanger=triangleGrid.grid{x_idx, y_idx};
    for compare=1:length(T_potentialDanger)
        tri=triangles(T_potentialDanger(compare),:);
        A=sites(tri(1),:)'; B=sites(tri(2),:)'; C=sites(tri(3),:)';
        if insideTriangle(A(1:2), B(1:2), C(1:2), Ft(1:2))
            if ~aboveTriangle(A,B,C,Ft)
                t_v=t;
                pt_v=Ft;
                return;
            end
        end
    end
end

return;
